
#ifdef GL_ES
precision mediump float;
#endif

const float PI=3.1415926535;

uniform vec2 u_resolution;
uniform float u_time;

mat2 scale(vec2 scale){
    return mat2(scale.x,0.,0.,scale.y);
}

float circleshape(vec2 position,vec2 center,float radius){
    return step(radius,length(position-center));
}

void main(){
    
    vec2 coord=gl_FragCoord.xy/u_resolution;
    vec3 color=vec3(0.);
    
    coord-=vec2(.5);
    coord=scale(vec2(cos(u_time)+2.))*coord;
    // coord+=vec2(.5);
    
    color+=vec3(circleshape(coord,vec2(0.0),.2));
    
    gl_FragColor=vec4(color,1.);
    
}

